<html>
<head><meta charset="utf-8"><title>rustc-wrapper · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html">rustc-wrapper</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206102417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206102417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Temirkhan Myrzamadi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206102417">(Aug 06 2020 at 03:56)</a>:</h4>
<p>Hello everyone. I've just built the compiler (<code>./x.py -i --jobs 4 build</code>) and want to compile a new cargo project:</p>
<div class="codehilite"><pre><span></span><code>export RUSTC_WRAPPER=&quot;/home/hirrolot/Desktop/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc&quot;
cargo check

error: failed to run rustc to learn about target-specific information

Caused by:
process didn&#39;t exit successfully: /home/hirrolot/Desktop/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib
--crate-type proc-macro --print=sysroot --print=cfg (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are rustc and -)
</code></pre></div>


<p>What's wrong with it? I haven't even modified the source code of rustc yet. Linux Mint</p>



<a name="206102934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206102934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206102934">(Aug 06 2020 at 04:09)</a>:</h4>
<p>I think you want <code>RUSTC</code>, not <code>RUSTC_WRAPPER</code></p>



<a name="206102941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206102941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206102941">(Aug 06 2020 at 04:09)</a>:</h4>
<p>RUSTC_WRAPPER passes <code>rustc</code> as well</p>



<a name="206103004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206103004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206103004">(Aug 06 2020 at 04:10)</a>:</h4>
<p>i think you can do this  by adding a custom toolchain to rustup instead, if you have it</p>



<a name="206103016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206103016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206103016">(Aug 06 2020 at 04:10)</a>:</h4>
<p>yeah I would recommend that instead</p>



<a name="206103028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206103028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206103028">(Aug 06 2020 at 04:11)</a>:</h4>
<p><code>rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1</code></p>



<a name="206103035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206103035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206103035">(Aug 06 2020 at 04:11)</a>:</h4>
<p>and then use it with <code>cargo +stage1 check</code></p>



<a name="206103489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustc-wrapper/near/206103489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Temirkhan Myrzamadi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustc-wrapper.html#206103489">(Aug 06 2020 at 04:22)</a>:</h4>
<p><code>RUSTC</code> works, thank you!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>